package org.flexspeedup.blog.events
{
import flash.events.Event;

import org.flexspeedup.blog.models.PopUpModel;

/**
 * Shows a pop up
 */
public class ShowPopUpEvent extends Event
{
    //--------------------------------------------------------------------------
    //
    //  Class Properties
    //
    //--------------------------------------------------------------------------

    //--------------------------
    // ID
    //--------------------------
    /**
     * Unique id for this event.
     */
    public static const ID:String = "ShowPopUpEvent";
    
    //--------------------------------------------------------------------------
    //
    // Constructor
    //
    //--------------------------------------------------------------------------

    /**
     * Creates a new instance of the <code>ShowPopUpEvent</code> event 
     */    
    public function ShowPopUpEvent(popUpModel:PopUpModel)
    {
        super(ID, true, true);
        _popUpModel = popUpModel;
    }

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  popUpModel
    //----------------------------------

    /**
     *  @private
     */
    private var _popUpModel:PopUpModel;

    /**
     * The model class used to render the pop up
     */
    public function get popUpModel():PopUpModel
    {
        return _popUpModel;
    }

    //--------------------------------------------------------------------------
    //
    //  Overridden Methods - Event
    //
    //--------------------------------------------------------------------------

    /**
     * @inheritdoc flash.events.Event#clone
     */
    override public function clone():Event
    {
        return new ShowPopUpEvent(popUpModel);
    }
}
}